<template>
	<view>
		<view class="parent">
			<u-icon name="checkmark-circle-fill" color="#19be6b" size="100"></u-icon>
		</view>
		<u--text align="center" :bold="true" text="充值成功"></u--text>

		<view class="btn_list">
			<u-button customStyle="width:280rpx" text="返回首页" @click="gotoIndex"></u-button>
			<u-button customStyle="width:280rpx" type="success" @click="gotoMyactivity" text="继续邀请"></u-button>
		</view>
	</view>
</template>


<script>
	import * as OrderApi from '@/api/order.js';
	
	
	export default {
		data() {
			return{
				   now_event_id:"",
				  }
		},
		onLoad(e) { 
			this.now_event_id    = e.event
			console.log("成功的页面e",e) 
		    console.log("成功的页面now_event_id",this.now_event_id)
			this.grant_sms()
		},
		methods: { 
			//检查订单支付情况，同时，为其套餐充值，后端的事情
			//触发为订单发放内容
			grant_sms()
			{
				 OrderApi.grant_sms({}).then(res => {
				 	if (res.status == 200) 
					{
				 		console.log("当前结果",res)
				 	}
					console.log("当前结果",res)
				 }) 
				 
				 console.log("当前结果",res)
			}
			,
			gotoIndex() {
				uni.reLaunch({
					url: '/pages/activity/activity'
				});
			},
			
			//返回活动邀请页面，这里应该要带参跳过去的
			gotoMyactivity() {
				let now_nid=this.now_event_id
				uni.redirectTo({
					url: '/pages/invite-friends/invite-friends',
					//event_id=292&leader_nid=295
					url: '/pages/invite-friends/invite-friends?event_id=' + now_nid + '&leader_nid='
				});
			}
		}
	}
</script>

<style>
	.parent {
		margin-top: 250rpx;
		margin-bottom: 20rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.btn_list {
		margin-top: 80rpx;
		display: flex;
		justify-content: space-between;
	}
</style>